FoodTrace is a cutting-edge food traceability system that revolutionizes supply chain transparency through blockchain technology. Our platform ensures food safety, authenticity, and complete traceability from farm to fork.
|
|
graph TB
A[🌐 Frontend - Next.js] --> B[🚀 API Gateway]
B --> C[🔐 Auth Service]
B --> D[📊 Traceability Service]
B --> E[⛓️ Blockchain Service]
C --> F[(🍃 MongoDB)]
D --> F
E --> G[📜 Smart Contracts]
G --> H[⛓️ Ethereum Network]
I[📱 Mobile App] --> B
J[🔍 QR Scanner] --> B
📁 Detailed Project Structure
foodtrace/
├── 🎨 frontend/ # Next.js React Application
│ ├── 📂 src/
│ │ ├── 🧩 components/ # Reusable UI components
│ │ ├── 📄 pages/ # Application pages
│ │ ├── 🎨 styles/ # CSS and styling
│ │ ├── 🛠️ utils/ # Utility functions
│ │ └── 🔗 hooks/ # Custom React hooks
│ ├── 📁 public/ # Static assets
│ └── ⚙️ config files
│
├── 🚀 backend/ # Node.js Express Server
│ ├── 📂 src/
│ │ ├── 🛣️ routes/ # API route definitions
│ │ ├── 🎮 controllers/ # Business logic handlers
│ │ ├── 📊 models/ # Database models
│ │ ├── 🔐 middleware/ # Authentication & validation
│ │ └── 🛠️ services/ # Business services
│ └── ⚙️ config files
│
└── ⛓️ blockchain/ # Smart Contracts & Web3
├── 📜 contracts/ # Solidity smart contracts
├── 🧪 test/ # Contract tests
├── 📋 scripts/ # Deployment scripts
└── ⚙️ config files
|
Next.js 14 SSR & Performance |
React 18 Modern Hooks |
TypeScript Type Safety |
Material-UI Premium Design |
Web3 Blockchain Integration |
|
Node.js Runtime Environment |
Express.js Web Framework |
MongoDB NoSQL Database |
JWT Authentication |
|
Solidity Smart Contracts |
Truffle Development Suite |
Hardhat Testing Framework |
Ethereum Blockchain Network |
| Requirement | Version | Status |
|---|---|---|
| Node.js | >= 14.x | ✅ Required |
| npm/yarn | Latest | ✅ Required |
| Git | Latest | ✅ Required |
| Ganache | Latest | 🔧 Development |
🔽 Step-by-step Installation
git clone https://github.com/your-username/foodtrace.git
cd foodtracecd frontend
npm installcd ../backend
npm installcd ../blockchain
npm install# Create MongoDB environment by using Docker
docker pull mongo:latest
docker run -d -p 27017:27017 --name foodtrace mongo:latest# ⛓️ Deploy Smart Contracts (Terminal 1)
# open ganache and get private_key
=> cd blockchain
=> python deploy.py (add private_key)
=> python app.py
# 🔥 Start Backend (Terminal 2)
cd backend
npm start
# 🚀 Start Frontend (Terminal 3)
cd frontend
npm start-
Visit the homepage: http://localhost:3000
👉 This page allows users to scan QR codes via camera or upload QR images. -
Access the admin dashboard at: http://localhost:3000/admin
👉 Reserved for admin accounts with the following credentials:- Email:
admin@gmail.com - Password:
admin123 - Features available:
- Manage supplier accounts
- Create new supplier accounts
- Email:
-
Experience the supplier dashboard: 👉 Please login a supplier account at http://localhost:3000/login
👉 Once logged in, you will be redirected to the Dashboard, where you can:- Add new products
- Update product status and quality
This project was collaboratively built by our team of 5 developers, each bringing unique skills and expertise. We welcome contributions from the community to help improve FoodTrace!
- 🍴 Fork the repository
- 🌿 Create your feature branch (
git checkout -b feature/AmazingFeature) - 📝 Commit your changes (
git commit -m 'Add some AmazingFeature') - 🚀 Push to the branch (
git push origin feature/AmazingFeature) - 🔄 Open a Pull Request
- 🐛 Bug Reports: Use our bug report template
- 💡 Feature Requests: Use our feature request template
- 📖 Documentation: Help improve our docs
- 🧪 Testing: Add tests for new features
- 🎨 UI/UX: Improve user experience
We plan to further improve FoodTrace in the following directions:
- 🌍 Expand support for multiple blockchains (e.g. Polygon, BNB Chain)
- 📱 Dedicated mobile application development (iOS/Android)
- 🤖 Integrated AI/ML to detect gaps and optimize supply chain
- 🏭 More integrated IoT devices to collect data in real time
- 🧾 Support technical expertise and compliance
- 🌐 Support multiple languages for users worldwide
- 📊 Enhanced analytics control panel to provide detailed information about the supply chain
- 🔗 API to integrate with third party
- 🛡️ Enhanced security and privacy features
- 🧑💼 Access to access according to the way and features for business
- Compatible with AI to make judgments, evaluate the quality of agricultural products
We are happy to deliver and close contribute to help shape the future of FoodTrace!
|
kuveee 🎨 Frontend Specialist React • TypeScript • UI/UX Testing • Deployment GitHub |
NTK1100 ⛓️ Blockchain Developer Solidity • Smart Contracts Testing • Deployment GitHub |
zh13u 🔧 Backend Engineer Node.js • MongoDB • APIs Testing • Deployment GitHub |
stepToBecomeGigachad ⛓️ Blockchain Developer Solidity • Smart Contracts Testing • Deployment GitHub |
Crabs536 🔧 Backend Engineer Node.js • MongoDB • APIs Testing • Deployment GitHub |
| 👨💻 Role | 🛠️ Responsibilities | 🚀 Technologies |
|---|---|---|
| Project Lead | Architecture, Coordination, Full-Stack Development | Next.js, React, Node.js, Project Management |
| Blockchain Dev | Smart Contracts, Web3 Integration, DApp Logic | Solidity, Truffle, Hardhat, Ethereum |
| Frontend Specialist | UI/UX Design, Component Development, Responsive Design | React, TypeScript, Material-UI, CSS |
| Backend Engineer | API Development, Database Design, Server Logic | Node.js, Express, MongoDB, RESTful APIs |
| Security & DevOps | Authentication, Testing, CI/CD, Deployment | JWT, Testing Frameworks, Docker, AWS |
Special thanks to all the amazing technologies, communities, and our team collaboration that made this project possible:
- ⚡ Vercel Team for Next.js framework
- ⚛️ React Team for the amazing library
- ⛓️ Ethereum Foundation for blockchain technology
- 🎨 Material-UI Team for beautiful components
- 🚀 Open Source Community for countless resources
- 💪 Each team member for their dedicated contributions
- 🤝 Collaborative spirit that made this project successful
- 🧠 Knowledge sharing between team members
- ⏰ Time management and meeting deadlines together
- 🐙 GitHub for version control and collaboration
- 💬 Discord/Slack for team communication
- 📋 Trello/Notion for project management
- ☕ Coffee & Late nights that powered our coding sessions










